public class Test {
    public static void main(String[] args) {
        MyArraylist myArraylist = new MyArraylist();

        try {
            myArraylist.add(1);
            myArraylist.add(2);
            myArraylist.add(3);
            myArraylist.add(4);
            myArraylist.add(5);
            myArraylist.display();
            myArraylist.add(1,99);
            myArraylist.add(6,18);
            myArraylist.display();
            System.out.println(myArraylist.contains(99));
            System.out.println(myArraylist.contains(100));
            System.out.println(myArraylist.indexOf(1));
            System.out.println(myArraylist.indexOf(99));
            System.out.println(myArraylist.indexOf(18));
            System.out.println("=============");
            System.out.println(myArraylist.get(0));
            System.out.println(myArraylist.get(6));
            System.out.println(myArraylist.get(4));
            //System.out.println(myArraylist.get(10));
            myArraylist.set(5,100);
            myArraylist.display();
            System.out.println("=============");
            myArraylist.remove(18);
            myArraylist.display();
            myArraylist.remove(99);
            myArraylist.display();
            System.out.println(myArraylist.size());
            myArraylist.clear();
            myArraylist.display();
        }catch (PosIllegalException | EmptyListException e){
            e.printStackTrace();
        }

    }
}
